package com.zr.util;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;

public class GetJDBCUtil {

	public Connection getJDBCConnection() {
		String driver = "com.mysql.jdbc.Driver";
		String url = "jdbc:mysql://172.18.23.24:3306/e_project";
		String name = "xp";
		String password = "123";
		Connection connection = null;
		try {
			Class.forName(driver);
			connection = DriverManager.getConnection(url, name, password);
		} catch (ClassNotFoundException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} catch (SQLException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}

		return connection;

	}
}
